#include <iostream>
using namespace std;
class A
{
    public:
       int a;
       A () { a = 10;} //"A"; }
       
       virtual void fun()
       {
           cout<<"fun in A"<<endl;
       }
       /*
       virtual void fun2()
       {
           cout<<"fun in A"<<endl;
       }
       */
};
class B:  public A{
    public:
        B():A()
        {
           //a = "B"; 
        }
};
class C:  public A{
    public:
        C():A()
        {
           //a = "C";
        }
};
class D: public B,public C{
    public:
        D():B(),C()
        {

        }
        void test()
        {
            cout<<B::a<<endl;
            cout<<C::a<<endl;
        }
};
int main()
{
    cout<<sizeof(A)<<endl;
    cout<<sizeof(B)<<endl;
    cout<<sizeof(D)<<endl;
    D d;
    d.test();
}